package cn.xuguowen.user.designPatten.factory.heima_abstract_factory;

/**
 * ClassName: Store
 * Package: cn.xuguowen.user.designPatten.factory.heima_abstract_factory
 * Description:
 * 商店
 * @Author 徐国文
 * @Create 2023/4/27 14:32
 * @Version 1.0
 */
public class Store {

    private Factory factory;

    public void setFactory(Factory factory) {
        this.factory = factory;
    }

    public Store() {
    }

    public Store(Factory factory) {
        this.factory = factory;
    }

    public Coffee getCoffee() {
        return factory.createCoffee();
    }

    public Dessert getDessert() {
        return factory.createDessert();
    }
}
